#ifndef DOCUMENTLOADER_H
#define DOCUMENTLOADER_H

#include "documentserializer.h"

class DocumentLoader : public DocumentSerializer
{
    Q_OBJECT
public:
    explicit DocumentLoader(QObject *parent = 0);
private:
    void loadGraphicsObject(QDataStream& in);
    void loadTexture(QPointer<AbstractObject> parent, QDataStream& in);
    void loadCollisionShape(QList<QPointer<CollisionShape> >& cShapes, QDataStream& in);

    QPointer<Document> m_doc;
signals:
    
public slots:
    bool serialize(const QString& filePath, QPointer<Document> document);
};

#endif // DOCUMENTLOADER_H
